Local Area Networks (LANs) are very popular means for interconnecting computers, especially personal computers. These computers are interconnected, in part, so that data may be electronically transferred from one computer to another and so that users can share resources such as files.
Several different type computers and computer operating systems can exist on a given network. For example, some of the computers can run Microsoft's OS/2 operating system and other computers can run a Unix-based operating system. These different computer systems need to transfer information in a protocol. The use of protocols in diverse computer systems is somewhat analogous to the use of the transmission protocols of AM and FM radio. An AM radio can only receive AM protocol signals, an FM radio can only receive FM protocol signals. Similarly, diverse computer systems cannot communicate unless they use the same protocol.
One such protocol for computer system file sharing is defined in the document entitled "Microsoft Networks/OpenNET FILE SHARING PROTOCOL," which is available from Intel Corporation as Intel Part Number 138446, and is hereby incorporated by reference. Systems that use that protocol can obtain or provide remote file services in a network environment. This protocol is referred to as the System Message Block (SMB) protocol because the protocol defines how data is to be packaged with SMB headers to be transmitted on the network. The protocol defines a server which provides file services and a consumer that accesses those services.
The SMB protocol defines how typical file access functions are to be accomplished on a network. For example, to read data from a file the consumer formats an SMB-read request block and then sends the block to the server. When the server receives the request, it retrieves the data from its file system, formats an SMB-read data response message, and sends the message with the data to the consumer. The consumer would then repeat this process for the next part of the file to be read.
FIG. 2A shows how a consumer receives data from an SMB-read. In this example, an application program makes a call to the operating system requesting a file read and passing the address of the buffer 21 for the requested data. The kernel of the operating system determines that a file access is required and passes the call to the redirector, if the file is stored on network device.
The redirector effects the read request by calling the transport system and requesting the data be stored in the SMB-buffer 23. The SMB-buffer 23 may not be large enough to store the entire data requested. The application program may request a large portion of the file, for example, 64K bytes. A typical size of the SMB-buffer data area may be 4K. Consequently, the redirector will need to send 16 requests for 4K of data each. For each of the 16 requests, the redirector initializes a network control block (NCB) to point to an SMB-buffer that contains the SMB-read command. The NCB also contains a pointer to the SMB-buffer in which to store the requested data. The redirector then calls the transport system.
The transport system transports the SMB-read command to the file server. When the response to the read is received, the transport system stores the SMB data directly in the SMB buffer of the redirector and returns to the redirector. The received SMB data contains both header information and data.
The redirector then stores the 4k bytes of SMB-buffer data, not the header, in the application buffer. The redirector then proceeds to send an SMB request to get the next 4k of data and when it receives the data it copies the data into the appropriate location in the application buffer. This process continues until the entire 64K of data is received.
The use of the prior message protocol has several disadvantages. First, there is a high overhead associated with formatting and sending NCB and SMB block. Second, the use of small blocks is inefficient to transfer large blocks of data. Third, there is duplicate copying occurring as the transport system copies the data to the SMB buffer and then the redirector copies the data to the application buffer. It would be desirable to have a method and system for implementing a protocol in which data can be transferred without these disadvantages.